package com.mine.modules.vm.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.mine.common.annotation.vm.TreeChildrenAnnotation;
import com.mine.common.annotation.vm.TreeIdAnnotation;
import com.mine.common.annotation.vm.TreeParentIdAnnotation;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author xujf
 * @since 2024-12-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("vm_personnel_depart")
@ApiModel(value="VmPersonnelDepart对象", description="")
public class VmPersonnelDepart implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @TreeIdAnnotation("id")
    private String id;

    @TreeParentIdAnnotation("parentId")
    private String parentId;

    private String departmentName;

    @TableField(exist = false)
    @TreeChildrenAnnotation("children")
    private List<VmPersonnelDepart> children;

}
